package lbframework.bean.button;

//import java.awt.event.ActionEvent;
//import javax.swing.AbstractAction;
//import javax.swing.JComponent;
//import javax.swing.KeyStroke;
//import lbframework.bean.dialog.LBDialog;
//import lbframework.bean.frame.LBFrame;
//import lbframework.bean.internalFrame.LBInternalFrame;

public class LBButton extends javax.swing.JButton {

//    Object frame = null;

    public LBButton() {
        initComponents();
    }

    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
    }// </editor-fold>//GEN-END:initComponents

//    public void setCancel(Object i_frame) {
//        frame = i_frame;
//
//        this.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ESCAPE"), "sair");
//        this.getActionMap().put("sair",
//                new AbstractAction("sair") {
//
//                    public void actionPerformed(ActionEvent evt) {
//                        try {
//                            if (frame instanceof LBInternalFrame) {
//                                ((LBInternalFrame) frame).setClosed(true);
//
//                            } else if (frame instanceof LBFrame) {
//                                ((LBFrame) frame).dispose();
//
//                            } else if (frame instanceof LBDialog) {
//                                ((LBDialog) frame).dispose();
//                            }
//
//                        } catch (Exception ex) {
//                        }
//                    }
//                });
//    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    // End of variables declaration//GEN-END:variables
}
